﻿
<div ng-controller="StaffEditController">
    <form name="form">
        <h3>Staff Edit</h3>
        <table class="tableKind-01 w760 ">
        <tr>
            <th>{{texts['lb-staff-id']}}</th>
            <td>{{stafData.Id}}</td>
        </tr>
        <tr>
            <th>{{texts['lb-staff-name']}}</th>
            <td>
                <div class="form-group mb0">
                    <input class="w200" id="name" name="name" type="text" ng-model="stafData.Name" validator="[required, requiredBlur]" />
                </div>
            </td>
        </tr>
        <tr>
            <th>{{texts['lb-name-kata']}}</th>
            <td>
                <div class="form-group mb0">
                    <input class="w200" id="NameKana" name="nameKata" type="text" ng-model="stafData.NameKana" validator="[required, requiredBlur]"/>
                </div>
            </td>
        </tr>
        <tr>
            <th>{{texts['lb-contract-type']}}</th>
            <td>
                <input id="contractType1" name="contractType" type="radio" value= 1 ng-model="stafData.ContractType"/>{{texts['lb-staff']}}&nbsp;&nbsp;&nbsp;
                <input id="contractType2" name="contractType" type="radio" value= 2 ng-model="stafData.ContractType"/>{{texts['lb-contact-staff']}}&nbsp;&nbsp;
                <input id="contractType3" name="contractType" type="radio" value= 3 ng-model="stafData.ContractType"/>{{texts['lb-part-staff']}}&nbsp;&nbsp;&nbsp;
                <input id="contractType4" name="contractType" type="radio" value= 4 ng-model="stafData.ContractType"/>{{texts['lb-partime-staff']}}
            </td>
        </tr>
        <tr>
            <th>{{texts['lb-store']}}</th>
            <td><ul class="listDoc">
                <li ng-repeat="store in allStores"><label><input type="checkbox" ng-model="store.Checked" /> {{store.StoreName}}</label></li>
            </ul></td>






        </tr>

        <tr>
            <td>{{texts['lb-state']}}</td>
            <td>
                <input id="workingStatus1" name="workingStatus" type="radio" value="1" ng-model="stafData.WorkingStatus"/> {{texts['lb-working']}}&nbsp;&nbsp;&nbsp;
                <input id="workingStatus2" name="workingStatus" type="radio" value="2" ng-model="stafData.WorkingStatus"/>{{texts['lb-quit']}}&nbsp;
                <input id="workingStatus3" name="workingStatus" type="radio" value="3" ng-model="stafData.WorkingStatus"/>{{texts['lb-retired']}}</td>
        </tr>
        <tr>
            <td class="">{{texts['lb-working-visa']}}</td>
            <td class="">
                <input id="visaStatus1" name="visaStatus" type="radio" value="1" ng-model="stafData.WorkVisa"/>{{texts['lb-necessary']}}&nbsp;&nbsp;&nbsp;&nbsp;
                <input id="visaStatus2" name="visaStatus" type="radio" value="2" ng-model="stafData.WorkVisa"/>{{texts['lb-unnecessary']}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <!--<input id="VisaExp" type="text" ng-model="stafData.VisaExperationDate" />-->
                <input type="text" datepicker-popup="{{format}}" ng-model="stafData.VisaExperationDate" is-open="openedDayForm" max-date="'2020-06-22'" datepicker-options="dateOptions" close-text="Close" />
                        <button type="button" class="btn colorBlack btn-default" ng-click="openDayFrom($event)"><i class="glyphicon glyphicon-calendar"></i></button>
            </td>
        </tr>
        <tr>
             <!--ng-disabled="form.$invalid"-->
            <td class="center" colspan="2">
                <ul class="listNgang mb0">
                    <li class="mr30">
                        <a ng-click="deleteStaff()" ng-if="showTest"><button class="w110">{{texts['btn-delete']}}</button></a>
                    </li>
                    <li>
                        <button class="w110" ng-click="saveStaff()">{{texts['btn-save']}}</button>
                    </li>
                </ul>
            </td>
        </tr>
    </table>

    </form>


    <div id="popup-wrapper"></div>
     <div class="popup-delete-save popupEffer clearfix" >
        <p class="popup-titleDelete">{{title}}</p>
        <ul class="popup-listBtn clearfix">
            <li><a ng-click="action()">Yes</a></li>
            <li><a class="b-close">No</a></li>
        </ul>
     </div>
</div>
